package com.qingdai.ordercenter.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.yulichang.query.MPJLambdaQueryWrapper;
import com.github.yulichang.query.MPJQueryWrapper;
import com.qingdai.business.emuns.Order;
import com.qingdai.business.emuns.Shop;
import com.qingdai.business.service.OrderService;
import com.qingdai.ordercenter.mapper.OrderMapper;
import jakarta.annotation.Resource;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 商品 服务实现类
 * </p>
 *
 * @author LiuZiMing
 * @since 2024-01-26
 */
@DubboService
@Service
public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements OrderService {
    @Resource
    private OrderMapper orderMapper;

    @Override
    public List<Order> getOrderByShopId(Integer shopId) {
        LambdaQueryWrapper<Order> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(Order::getShopId, shopId);
        return orderMapper.selectList(wrapper);
    }
}
